extern "C"
{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
}
#include <string>
#include <iostream>
#include "occi.h"
#include "pub/def.h"
#include "pub/db.h"
#include "pub/err.h"
#include "pub/log.h"
#include "test_pub_sys.h"
#include "test_pub_serial.h"
#include "test_pub_priv.h"
#include "test_pub_log.h"
#include "test_pub_business.h"
#include "test_pub_acct.h"

using namespace std;
using namespace oracle::occi;

int main()
{
	try
	{
		TestPubSystem pubSys;
		pubSys.test_init();
	}
	catch (...)
	{
		return -1;
	}

	try
	{
		TestPubSerial pubSerial;
		pubSerial.test_genOrderSerial();
		pubSerial.test_genAppSerial();
		pubSerial.test_genAckSerial();
		pubSerial.test_genLogSerial();
	}
	catch (...)
	{
		return -1;
	}

	try
	{
		TestPubPriv pubPriv;
		pubPriv.test_checkSys();
		pubPriv.test_checkAcctTrans();
		pubPriv.test_checkAcctTA();
		pubPriv.test_checkFund();
	}
	catch (...)
	{
		return -1;
	}

	try
	{
		TestPubLog pubLog;
		pubLog.test_writeLog();
	}
	catch (...)
	{
		return -1;
	}

	try
	{
		TestPubBusiness pubBusiness;
		pubBusiness.test_checkIdcard();

	}
	catch (...)
	{
		return -1;
	}

	try
	{
		TestPubAccount pubAccount;
		pubAccount.test_genCustAccount();
		pubAccount.test_genTransAccount();
	}
	catch (...)
	{
		return -1;
	}
}
